<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    function quickSort(arr) {
        if (arr.length < 2) { return arr };
        var left = [], right = [], mid = arr.splice(Math.floor(arr.length / 2), 1);
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] <= parseInt(mid)) {
                left.push(arr[i]);
            } else {
                right.push(arr[i])
            }
        }
        return [...quickSort(left), ...mid, ...quickSort(right)]
    }
    let arr = [ 8 , 2 , 3, "3*", 4 , 17 , 25 ]
    quickSort(arr)
    console.log(quickSort(arr))
</script>
</body>
</html>